package com.neo.controler;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

/**
 * @Author: lishuangqiang
 * @Date: 2020/3/28
 * @Description:
 */
@RestController
public class SessionConrtroler {
    @PostMapping(value = "/set")
    public void setSession(HttpSession httpSession, String userName) {
        httpSession.setAttribute("username", userName);
    }
}
